package com.zenithmind.library.pojo.query;

import com.zenithmind.common.query.BaseQuery;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.time.LocalDate;

/**
 * 预约查询条件
 *
 * @author ZenithMind
 * @since 2024-06-14
 */
@EqualsAndHashCode(callSuper = true)
@Data
@Schema(name = "预约查询条件", description = "预约查询的条件参数")
public class ReservationQuery extends BaseQuery {

    @Schema(description = "用户ID", example = "1")
    private String userId;

    @Schema(description = "用户姓名", example = "张三")
    private String userName;

    @Schema(description = "用户学号/工号", example = "20240001")
    private String userNumber;

    @Schema(description = "图书ID", example = "1")
    private String bookId;

    @Schema(description = "图书标题", example = "Java编程思想")
    private String bookTitle;

    @Schema(description = "图书ISBN", example = "9787111213826")
    private String bookIsbn;

    @Schema(description = "预约状态 (0-预约中, 1-可取书, 2-已取书, 3-已取消, 4-已过期)", example = "0")
    private Integer status;

    @Schema(description = "预约开始日期", example = "2024-01-01")
    private LocalDate reservationStartDate;

    @Schema(description = "预约结束日期", example = "2024-12-31")
    private LocalDate reservationEndDate;

    @Schema(description = "到期开始日期", example = "2024-01-01")
    private LocalDate expirationStartDate;

    @Schema(description = "到期结束日期", example = "2024-12-31")
    private LocalDate expirationEndDate;

    @Schema(description = "是否已过期 (0-否, 1-是)", example = "0")
    private Integer isExpired;

    @Schema(description = "是否已通知 (0-否, 1-是)", example = "1")
    private Integer notified;

    @Schema(description = "通知方式 (1-邮件, 2-短信, 3-站内信)", example = "1")
    private Integer notificationMethod;

    @Schema(description = "预约优先级", example = "1")
    private Integer priority;

    @Schema(description = "最小排队位置", example = "1")
    private Integer minQueuePosition;

    @Schema(description = "最大排队位置", example = "10")
    private Integer maxQueuePosition;

    @Schema(description = "操作员ID", example = "admin")
    private String operatorId;

    @Schema(description = "排序字段", example = "reservationDate")
    private String sortField;

    @Schema(description = "排序方向 (asc/desc)", example = "desc")
    private String sortOrder;
}
